package icu.zhhll.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zh
 * @date 2023/8/15 10:53
 */
@RestController
@RequestMapping("/test")
public class TestController {

    private static final Logger LOGGER = LoggerFactory.getLogger(TestController.class);


    @RequestMapping("/logger")
    public String logger() {
        LOGGER.info("打印测试");
        return "ok";
    }

    @PostMapping("/body")
    public String body(@RequestBody String body) {
        LOGGER.info("请求内容{}", body);
        return "ok";
    }
}
